function share_twitter() {u = location.href;t = document.title;window.open("http://twitter.com/home?status=" + encodeURIComponent(u));}
function share_facebook() {u = location.href;t = document.title;window.open("http://www.facebook.com/share.php?u=" + encodeURIComponent(u) + "&t=" + encodeURIComponent(t));}
function share_google() {u = location.href;t = document.title;window.open("http://www.google.com/bookmarks/mark?op=edit&bkmk=" + encodeURIComponent(u) + "&title=" + t + "&annotation=" + t);}
function share_buzz() {u = location.href;t = document.title;window.open("http://buzz.yahoo.com/buzz?publisherurn=nhacvietaudio&targetUrl=" + encodeURIComponent(u));}
function share_digg() {u = location.href;t = document.title;window.open("http://digg.com/submit?phase=2&url=" + encodeURIComponent(u));}
function share_reddit() {u = location.href;t = document.title;window.open("http://reddit.com/submit?url=" + encodeURIComponent(u));}
function share_dzone() {u = location.href;t = document.title;window.open("http://dzone.com/links/add.html?url=" + encodeURIComponent(u));}
function share_furl() {u = location.href;t = document.title;window.open("http://furl.net/storeIt.jsp/add.html?&u=" + encodeURIComponent(u));}
function share_technorati() {u = location.href;t = document.title;window.open("http://technorati.com/faves?add=" + encodeURIComponent(u));}
function ew_MouseOver(row) {
	row.mover = true; // Mouse over
	if (typeof(row.oClassName) == "undefined")
		row.oClassName = row.className;
	if (typeof(row.oCssText) == "undefined")
		row.oCssText = row.style.cssText;
	if (!row.selected) {
		row.className = rowmoverclass;
		row.style.cssText = "";
	}
}

// Set mouse out color
function ew_MouseOut(row) {
	row.mover = false; // Mouse out
	if (!row.selected)
		ew_SetColor(row);
}

// Set row color
function ew_SetColor(row) {
	if (row.selected) {
		if (typeof(row.oClassName) == "undefined")
			row.oClassName = row.className;
		if (typeof(row.oCssText) == "undefined")
			row.oCssText = row.style.cssText;
		row.className = rowselectedclass;
	} else if (row.edit) {
		row.className = roweditclass;
	} else {
		if (typeof(row.oClassName) != "undefined")
			row.className = row.oClassName;
		if (typeof(row.oCssText) != "undefined")
			row.style.cssText = row.oCssText;
	}
}

// Set selected row color
function ew_Click(row) {
	if (row.deleteclicked)
		row.deleteclicked = false; // Reset delete button/checkbox clicked
	else {
		var bselected = row.selected;
		ew_ClearSelected(); // Clear all other selected rows
		if (!row.deleterow) row.selected = !bselected; // Toggle
		ew_SetColor(row);
	}
}
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
 	{
 		// Firefox, Opera 8.0+, Safari
 		xmlHttp=new XMLHttpRequest();
 	}
	catch (e)
 	{
 		//Internet Explorer
 		try
  		{
  			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  		}
 		catch (e)
  		{
  			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  		}
 	}
	return xmlHttp;
}
xmlHttp=GetXmlHttpObject();
function loadPageInToElement( url,str,element_id )
{		
		url=url+"?q="+str;
		if (xmlHttp==null)
 		{
 		alert ("Browser does not support HTTP Request");
 		return;
 		}
		var element = document.getElementById( element_id );
		element.innerHTML = "";
		element.innerHTML = '<em>Loading ...</em>';
		xmlHttp.open( "POST", url );
		xmlHttp.onreadystatechange = function()
		{		
			if( xmlHttp.readyState == 4 && xmlHttp.status == 200 )
			{
				element.innerHTML = xmlHttp.responseText;
			}
		}
		xmlHttp.send( null );
		
}
function flash(url,w,h,bg,win,vars){

	var s=

	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' align='middle'>"+

	"<param name='movie' value='"+url+"' />"+

	"<param name='wmode' value='"+win+"' />"+

	"<param name='quality' value='high' />"+

	"<param name='FlashVars' value='"+vars+"' />"+

	"<param name='bgcolor' value='"+bg+"' />"+

	"<embed src='"+url+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+

	"</object>";

	document.write(s);

}





var theImages = new Array() // do not change this



theImages[0] = 'skins/ktd/design1/banner1.css'

theImages[1] = 'skins/ktd/design1/banner2.css'

theImages[2] = 'skins/ktd/design1/banner3.css'

theImages[3] = 'skins/ktd/design1/banner4.css'

theImages[4] = 'skins/ktd/design1/banner5.css'





var j = 0

var p = theImages.length;

var preBuffer = new Array()

for (i = 0; i < p; i++){

   preBuffer[i] = new Image()

   preBuffer[i].src = theImages[i]

}

var whichImage = Math.round(Math.random()*(p-1));

function showImage(){

document.write('<link rel="stylesheet" href="'+theImages[whichImage]+'">');



//document.write('<img src="'+theImages[whichImage]+'">');

}

function NewWindow2(url,w,h) {

		detail = window.open(url,'NewWinOpen','scrollbars=yes,statusbar=yes, resizables=no,width='+w+' height='+h+'');

		detail.focus();

		return;

	}
	function paging($ipage)

	 {	  

		document.frm_page.curpg.value = $ipage ;

		document.frm_page.submit();	

	 }	